<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>管理人员修改</title>
<link rel="stylesheet" type="text/css"
	href="../../layui/css/layui.css" media="all">
<style type="text/css">
	body{
		margin:20px 0px;
	}
	#zc{
		display:none;
	}
	iframe{
		border:0px solid;
		position:fixed;
		right:0px;
		top:0px;
		width:560px;
		height:400px;
	}
</style>
</head>
<body>
	<fieldset class="layui-elem-field layui-field-title"
		style="margin-top: 20px;">
		<legend>修改管理人员</legend>
	</fieldset>

	<form class="layui-form" action="../../filiale/update.action" method="post">
		<input type="hidden" name="filId" id="filId" >
		<div id="body">
			
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">名称</label>
				<div class="layui-input-inline">
					<input type="text" name="filName" id="filName" readonly
					 placeholder="分公司名称" autocomplete="off" maxlength="20"
						class="layui-input">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">地址</label>
				<div class="layui-input-inline">
					<input type="text" name="filSite" id="filSite" required
						lay-verify="required" placeholder="地址" maxlength="30"
						autocomplete="off" class="layui-input">
				</div>
			</div>
		</div>
		
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">管理人</label>
				<div class="layui-input-inline">
					<input type="text" name="filPreson" id="filPreson" required
						lay-verify="required" maxlength="10" placeholder="管理人"
						autocomplete="off" class="layui-input">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<input type="submit" class="layui-btn" lay-submit=""
					lay-filter="update" value="立即修改">
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</form>
	<script src="../../layui/layui.js" charset="utf-8"></script>
	<script src="../../res/wzw/js/jquery.min.1.6.4.js"></script>
	<script type="text/javascript">
		layui.use(['form','layer'], function(){
			  var form = layui.form
			  ,layer = layui.layer
			  ,$ = layui.$;
			  
			  $(function(){
					var url = "../../policy/findByPolicyId.action";
					$.post(url, null, function(mes) {
						$.each(mes.list, function(index, item) {
							$("#body").append("<input type='hidden' name='filIds' id='filIds'  value='"+item.filIds+"'>");
						});
						
						form.render();
						var ss=$("#filIds").val();
						var filId=$("#filId").val();
						var fil=ss.split(",");
						for(var i=0; i<fil.length; i++){
							if(filId==fil[i]){
								$("#zc").show();
							}
						}
					}, 'json');
			  });
			  form.on('submit(update)',function(){
				  parent.location.reload(); // 父页面刷新
			  });
		});
	</script>
</body>
</html>